﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace proxy4
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class UserdataWnd : Window
    {
        public UserdataWnd()
        {
            InitializeComponent();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Settings1.Default.IPGUsername = tb1.Text;
            Settings1.Default.IPGPassword = pb1.Password;
            Settings1.Default.Username = tb2.Text;
            Settings1.Default.Password = pb2.Password;
            this.Close();
        }

        private void CheckBox_Checked_1(object sender, RoutedEventArgs e)
        {

            tb1.IsEnabled = false;
            tb1.Opacity = 0.4;
            pb1.IsEnabled = false;
            pb1.Opacity = 0.4;

        }

        private void ckbManu_Unchecked(object sender, RoutedEventArgs e)
        {
            tb1.IsEnabled = true;
            tb1.Opacity = 0.8;
            pb1.IsEnabled = true;
            pb1.Opacity = 0.8;
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
